STORE CENTER('^U = PgUp ^D = PgDn HOME = Main Menu Esc = Quit',76) TO HELPLINE
STORE 'ASSIGN BOX(05,05,19,74,42,42,42,42,42,42)' TO BIG_BOX
STORE ' ' TO X.ANS
********
USE MAIL
SET SAFETY OFF
*******
*&GETNORMAL
*&SAYERASE
&SAYREVERSE
ERASE
TEXT
Welcome to the dBMAN Tutorial !
This tutorial is designed to teach you all the commands needed to
create and use your own data base. If you leave this tutorial,
you may at any time type DO TUTOR, and re-run this program.
dBMAN is easy to use. In just a few short minutes this tutorial
will show you how to CREATE, USE, APPEND, DISPLAY, LOCATE, EDIT,
DELETE, SORT, and INDEX your new data base.
ENDTEXT
&BIG_BOX
&SAYNORMAL
@ 24,01 SAY CENTER('Please press any key to continue.',78)
WAIT
DO WHILE T
IF LASTKEY() = 27
CLEAR
RETURN
ENDIF
&SAYREVERSE
ERASE
ASSIGN VMENU('*','GETTING STARTED*CREATE A MAIL LIST*USING A MAIL LIST*ADDING RECORDS*DISPLAYING RECORDS*LOCATING RECORDS*EDITING RECORDS*SORTING RECORDS*INDEXING RECORDS*QUIT',5,1)
DO CASE
CASE VMENU() = 1 | GETTING STARTED
ERASE
DO TUTORGS0
CASE VMENU() = 2 | CREATE
ERASE
DO TUTORCR0
CASE VMENU() = 3 | USE
ERASE
DO TUTORUS0
CASE VMENU() = 4 | ADD
ERASE
DO TUTORAD0
CASE VMENU() = 5 | DISPLAY
ERASE
DO TUTORDS0
CASE VMENU() = 6 | LOCATE
ERASE
DO TUTORLO0
CASE VMENU() = 7 | EDIT
ERASE
DO TUTORED0
CASE VMENU() = 8 | SORT
ERASE
DO TUTORSO0
CASE VMENU() = 9 | INDEXING
ERASE
DO TUTORID0
CASE NRANGE(VMENU(),40,49) | HELP
ERASE
DO TUTORHLP
OTHERWISE
CLEAR
RETURN
ENDCASE
ENDDO
RETURN
***************
PROCEDURE TUTORHLP
***************
@ 10,00 ESAY ' '
TEXT
Welcome to the dBMAN Tutorial.
To select a menu item, simply use the arrow key to highlight the
command you would like to see, then press the return key.
Each section will discuss the different dBMAN commands necessary
for you to create and use your own data base. Some sections will
even let you enter your own data!
ENDTEXT
ASSIGN BOX(09,05,19,74,42,42,42,42,42,42)
& SAYNORMAL
@ 24,02 SAY CENTER('PRESS ANY KEY TO CONTUNUE',76)
WAIT
&SAYREVERSE
RETURN
************
PROCEDURE TUTORGS0
************
* TUTORGS0.PRG
DO WHILE T
DO NORMSCR
TEXT
THE dBMAN SCREEN
The dBMAN screen is divided into two sections, with the command
window at the top and the data window below. These two sections
will allow you to see dBMAN prompts and messages without
disrupting your data display.
The command field is where you enter commands for execution.
dBMAN places the cursor at the "CMD:" caption when it is ready
to receive a command.
ENDTEXT
ASSIGN BOX(08,05,19,74,42,42,42,42,42,42)
&SAYNORMAL
@24,02 SAY HELPLINE
&SAYREVERSE
WAIT
DO LKEY
DO CASE
CASE Y.LKEY = 'N'
DO TUTORGS1
CASE Y.LKEY = 'P'
*CLOSE ALL
RETURN TO MAIN
ENDCASE
ENDDO
RETURN
************
PROCEDURE TUTORGS1
**********
DO WHILE T
@ 05,00 ERASE
DO NORMSCR
TEXT
THE dBMAN SCREEN
The message field is where you will receive messages from dBMAN.
The message is posted after the "MSG:" caption; if the message is
reporting an error, a beep will sound. The message is
automatically erased when you press any key.
The file ID field displays the name and file ID of the current
data file. dBMAN will display FP (Primary) when it is first
started. The current record field displays the record number
that was last accessed by dBMAN.
ENDTEXT
ASSIGN BOX(07,05,19,74,42,42,42,42,42,42)
&SAYNORMAL
@ 24,02 SAY HELPLINE
&SAYREVERSE
WAIT
DO LKEY
DO CASE
CASE Y.LKEY = 'N'
DO TUTORGS2
CASE Y.LKEY = 'P'
@ 05,00 ERASE
EXIT
ENDCASE
ENDDO
RETURN
************
PROCEDURE TUTORGS2
************
DO WHILE T
@ 05,00 ERASE
DO NORMSCR
TEXT
THE dBMAN SCREEN
The key summary field is a second message field that displays a
reminder of which control keys apply to the current command.
F7 will display all the memory variables in use. F8 will display
dBMAN "switches" and the data files in use. F9 will give an
extended explanation of an error message. F10 will provide HELP
based on the command in the command line.
ENDTEXT
ASSIGN BOX(08,05,19,74,42,42,42,42,42,42)
&SAYNORMAL
@24,02 SAY HELPLINE
&SAYREVERSE
WAIT
DO LKEY
DO CASE
CASE Y.LKEY = 'N'
DO TUTORCR0
CASE Y.LKEY = 'P'
*CLOSE ALL
EXIT
ENDCASE
ENDDO
RETURN
************
PROCEDURE TUTORCR0
************
* CREATE
DO WHILE T
@ 05,00 ERASE
DO NORMSCR
TEXT
Create Mailing List
The first thing you will need to do is to create a data base.
The command you will use is CREATE <filename.DBF>. You will
insert your own file name instead of the <>'s. (Please refer to
your DOS manual if you are not sure of what a proper filename
should be.) If you do not specify an extension, dBMAN will use a
".DBF" extension.
Here we will use the name MAIL.
ENDTEXT
ASSIGN BOX(11,05,22,74,42,42,42,42,42,42)
DO NORMSCR
&SAYNORMAL
@ 24,01 SAY HELPLINE
&SAYREVERSE
WAIT
DO LKEY
DO CASE
CASE Y.LKEY = 'N'
DO TUTORCR1
CASE Y.LKEY = 'P'
EXIT
ENDCASE
ENDDO
RETURN
************
PROCEDURE TUTORCR1
************
* CREATE
DO WHILE T
@ 06,00 ERASE
DO NORMSCR
@ 17,00 SAY CENTER('Create Mailing List',79)
TEXT
Here we will define the data base structure. We'll tell dBMAN
the name of each field and the type of data we will store in it
(Character, Number, Date, Logical), how many places to reserve in
the record for the data, and if it is a number type, how many
decimal places we will need.
ENDTEXT
ASSIGN BOX (16,05,23,74,42,42,42,42,42,42)
X.STRING = 'CREATE MAIL '
X.STRROW = 0
X.STRCOL = 4
X.STRTIME = 5
DO PRINTTXT
@ 03,04 SAY 'Enter structure'
@ 03,40 SAY RTJUST('FP MAIL.DBF Rec BOF ',40)
&SAYNORMAL
@ 04,00 SAY '^S=save ^Q=quit ^E=era ^I=ins'
&SAYREVERSE
@ 05,06 SAY 'fieldname type width decimal'
@ 06,51 SAY 'Bytes remaining :'
@ 07,51 SAY 'No. of fields :'
******
@ 06,70 SAY '4000'
@ 07,73 SAY '1'
******
*FIRSTNAME
*******
@ 06,03 SAY '1'
&SAYNORMAL
@ 06,06 SAY SPACE(10)
@ ROW(),22 SAY ' '
@ ROW(),32 SAY ' '
@ ROW(),42 SAY ' '
X.STRING = 'FIRST_NAME'
X.STRROW = 6
X.STRCOL = 6
X.STRTIME = 5
DO PRINTTXT
X.STRING = 'C'
X.STRROW = 6
X.STRCOL = 22
X.STRTIME = 5
DO PRINTTXT
X.STRING = ' 10'
X.STRROW = 6
X.STRCOL = 32
X.STRTIME = 5
DO PRINTTXT
&SAYREVERSE
******
* LAST NAME
******
@ 06,70 SAY '3990'
@ 07,73 SAY '2'
******
@ 07,03 SAY '2'
&SAYNORMAL
@ 07,06 SAY SPACE(10)
@ ROW(),22 SAY ' '
@ ROW(),32 SAY ' '
@ ROW(),42 SAY ' '
X.STRING = 'LAST_NAME '
X.STRROW = 7
X.STRCOL = 6
X.STRTIME = 5
DO PRINTTXT
X.STRING = 'C'
X.STRROW = 7
X.STRCOL = 22
X.STRTIME = 5
DO PRINTTXT
X.STRING = ' 20'
X.STRROW = 7
X.STRCOL = 32
X.STRTIME = 5
DO PRINTTXT
&SAYREVERSE
******
* ADDRESS
******
@ 06,70 SAY '3970'
@ 07,73 SAY '3'
******
@ 08,03 SAY '3'
&SAYNORMAL
@ 08,06 SAY SPACE(10)
@ ROW(),22 SAY ' '
@ ROW(),32 SAY ' '
@ ROW(),42 SAY ' '
X.STRING = 'ADDRESS'
X.STRROW = 8
X.STRCOL = 6
X.STRTIME = 5
DO PRINTTXT
X.STRING = 'C'
X.STRROW = 8
X.STRCOL = 22
X.STRTIME = 5
DO PRINTTXT
X.STRING = ' 60'
X.STRROW = 8
X.STRCOL = 32
X.STRTIME = 5
DO PRINTTXT
&SAYREVERSE
******
*CITY
*******
@ 06,70 SAY '3910'
@ 07,73 SAY '4'
******
@ 09,03 SAY '4'
&SAYNORMAL
@ 09,06 SAY SPACE(10)
@ ROW(),22 SAY ' '
@ ROW(),32 SAY ' '
@ ROW(),42 SAY ' '
X.STRING = 'CITY'
X.STRROW = 9
X.STRCOL = 6
X.STRTIME = 5
DO PRINTTXT
X.STRING = 'C'
X.STRROW = 9
X.STRCOL = 22
X.STRTIME = 5
DO PRINTTXT
X.STRING = ' 15'
X.STRROW = 9
X.STRCOL = 32
X.STRTIME = 5
DO PRINTTXT
&SAYREVERSE
******
* STATE
******
@ 06,70 SAY '3895'
@ 07,73 SAY '5'
******
@ 10,03 SAY '5'
&SAYNORMAL
@ 10,06 SAY SPACE(10)
@ ROW(),22 SAY ' '
@ ROW(),32 SAY ' '
@ ROW(),42 SAY ' '
X.STRING = 'STATE'
X.STRROW = 10
X.STRCOL = 6
X.STRTIME = 5
DO PRINTTXT
X.STRING = 'C'
X.STRROW = 10
X.STRCOL = 22
X.STRTIME = 5
DO PRINTTXT
X.STRING = ' 2'
X.STRROW = 10
X.STRCOL = 32
X.STRTIME = 5
DO PRINTTXT
&SAYREVERSE
******
* ZIP
******
@ 06,70 SAY '3893'
@ 07,73 SAY '6'
******
@ 11,03 SAY '6'
&SAYNORMAL
@ 11,06 SAY SPACE(10)
@ ROW(),22 SAY ' '
@ ROW(),32 SAY ' '
@ ROW(),42 SAY ' '
X.STRING = 'ZIP'
X.STRROW = 11
X.STRCOL = 6
X.STRTIME = 5
DO PRINTTXT
X.STRING = 'C'
X.STRROW = 11
X.STRCOL = 22
X.STRTIME = 5
DO PRINTTXT
X.STRING = ' 5'
X.STRROW = 11
X.STRCOL = 32
X.STRTIME = 5
DO PRINTTXT
&SAYREVERSE
******
*PHONE
******
@ 06,70 SAY '3888'
@ 07,73 SAY '7'
******
@ 12,03 SAY '7'
&SAYNORMAL
@ 12,06 SAY SPACE(10)
@ ROW(),22 SAY ' '
@ ROW(),32 SAY ' '
@ ROW(),42 SAY ' '
X.STRING = 'PHONE'
X.STRROW = 12
X.STRCOL = 6
X.STRTIME = 5
DO PRINTTXT
X.STRING = 'C'
X.STRROW = 12
X.STRCOL = 22
X.STRTIME = 5
DO PRINTTXT
X.STRING = ' 12'
X.STRROW = 12
X.STRCOL = 32
X.STRTIME = 5
DO PRINTTXT
&SAYREVERSE
*********
* LAST
*********
@ 06,70 SAY '3876'
@ 03,04 SAY 'Done '
@ 00,04 ESAY ' '
******
&SAYNORMAL
@ 24,01 SAY HELPLINE
&SAYREVERSE
WAIT
DO LKEY
DO CASE
CASE Y.LKEY = 'N'
DO TUTORCR2
CASE Y.LKEY = 'P'
&SAYREVERSE
@ 00,00 ESAY 'CMD:'
EXIT
ENDCASE
ENDDO
RETURN
************
PROCEDURE TUTORCR2
************
* CREATE
DO WHILE T
@ 14,00 ERASE
@ 17,00 SAY CENTER('Create Mailing List',80)
TEXT
NOTE: Although the phone and zip fields contain numbers, we'll
use the "C" (Character) type. This will allow us to have leading
zero's and use the "-" character.
ENDTEXT
ASSIGN BOX(16,05,23,74,42,42,42,42,42,42)
&SAYNORMAL
@ 24,01 SAY HELPLINE
&SAYREVERSE
WAIT
DO LKEY
DO CASE
CASE Y.LKEY = 'N'
DO TUTORCR3
CASE Y.LKEY = 'P'
@ 00,00 ESAY 'CMD:'
EXIT
ENDCASE
ENDDO
RETURN
************
PROCEDURE TUTORCR3
************
* CREATE
DO WHILE T
@ 14,00 ERASE
@ 17,00 SAY CENTER('Create Mailing List',80)
TEXT
You will want to set up your data base structure to allow you to
store any data you might want to find later. Don't worry though,
if you don't get it right the first time you can always come back
and add, delete , insert , and rename the fields. This can be
done by using the commands MODIFY STRUCTURE and MODIFY FIELDNAME.
ENDTEXT
ASSIGN BOX(16,05,23,74,42,42,42,42,42,42)
&SAYNORMAL
@ 24,01 SAY HELPLINE
&SAYREVERSE
WAIT
DO LKEY
DO CASE
CASE Y.LKEY = 'N'
ERASE
DO TUTORUS0
CASE Y.LKEY = 'P'
EXIT
ENDCASE
ENDDO
RETURN
************
PROCEDURE TUTORUS0
************
DO WHILE T
DO NORMSCR
@ 05,00 ERASE
@ 08,00 SAY CENTER('Use Mailing List',80)
TEXT
Once you have created a data base, you will want to put
information into it. But first you will need to USE a data base.
The command is quite easy. Just type: USE <filename>, where
filename is the name of your data base. We'll use the MAIL.DBF
again.
When a file is in use, dBMAN will display the selected area ID
(FP is the default) and the name of the file. You can have only
one file open in each area. If you have more than one file in
use and would like to see the file names, you can press the F8